home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #3 / Amiga Plus CD - 1996 - No. 3.iso / demo-versionen / databaseprofessional_v3.0 / clipart / book.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-13  |  1KB  |  71 lines

  1. /* book index */
  2.  
  3. PARSE ARG argline
  4. PARSE VAR argline name shownew .
  5.  
  6. OPTIONS RESULTS
  7.  
  8. top  = 20
  9. left = 5
  10. xbox = 150
  11. ybox = 17
  12. xoff = xbox+2
  13. yoff = ybox+2
  14.  
  15. Open(file,name,R)
  16. IF RC ~= 5 THEN EXIT
  17.  
  18. idx = 1
  19. weiter = 0
  20. DO WHILE weiter = 0
  21.   title.idx = ReadLn(file)
  22.   idx = idx + 1
  23.   weiter = EOF(file)
  24. END
  25. Close(file)
  26.  
  27. ADDRESS DataBase
  28. GetMaskSize
  29. size = result
  30. width = WORD(size,1)
  31. height = WORD(size,2)
  32. ClearMask
  33. ADDRESS
  34.  
  35. x = left
  36. y = top
  37.  
  38. c = 1
  39. row = 0
  40. weiter = 0
  41. ADDRESS DataBase
  42. DO WHILE c < idx-1
  43.   Box x y xbox ybox 1000
  44.   Text x+4 y+12 1 title.c
  45.   c = c + 1
  46.   y = y + yoff
  47.   IF y > height-ybox THEN DO
  48.     x = x + xoff
  49.     IF row = 0 THEN row = c-1
  50.     IF x+xbox > width THEN c = idx
  51.     y = top
  52.   END
  53. END
  54.  
  55. WaitCommand "Verzeichnis wählen ..."
  56. comm = result
  57. IF WORDS(comm) ~= 3 THEN DO
  58.   IF shownew = 1 THEN
  59.     Show NEW
  60.   EXIT
  61. END
  62. mx = WORD(comm,1)
  63. my = WORD(comm,2)
  64. nr = ((my-top)%yoff+1) + ((mx-left)%xoff) * row
  65. Display Off
  66. Search "#?/" || title.nr || "#?"
  67. Display On
  68. IF shownew = 1 THEN
  69.   Show NEW
  70.  
  71.